﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vector3 = Microsoft.Xna.Framework.Vector3;

namespace Flight
{
    public static class Shadow
    {
        public static Vector3 shadowLoc(Vector3 lightDir, Vector3 objLoc, float groundZ)
        {
            float dist = (groundZ - objLoc.Z) / lightDir.Z;
            return new Vector3(
                objLoc.X + lightDir.X * dist,
                objLoc.Y + lightDir.Y * dist,
                groundZ);
        }
    }
}
